﻿using SrBBSPro.BaseClasses;
using System;
using NPoco;
using SrBBSPro.Util;
using System.Collections.Generic;

namespace SrBBSPro.Entities
{
    [TableName("Project")]
    [PrimaryKey("Id")]
    public class Project : BaseEntity<long>
    {

        /// <summary>
        /// 项目名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 部门
        /// </summary>
        public string Depart { get; set; }


        [Ignore]
        public string DepartName
        {
            get => DataHelper.DepartName[Depart];
        }

        /// <summary>
        /// 项目概要
        /// </summary>
        public string Info { get; set; }

        /// <summary>
        /// 项目纳期
        /// </summary>
        public DateTime EndDate { get; set; }

        /// <summary>
        /// 项目分类
        /// </summary>
        public string ProjectKind { get; set; }


        [Ignore]
        public string ProjectKindName
        {
            get =>  ProjectKindDic[ProjectKind];
        }
        /// <summary>
        /// 移行前语言
        /// </summary>
        public string BefLang { get; set; }

        /// <summary>
        /// 移行后语言
        /// </summary>
        public string AftLang { get; set; }

        /// <summary>
        /// 移行前DB
        /// </summary>
        public string BefDB { get; set; }

        /// <summary>
        /// 移行后DB
        /// </summary>
        public string AftDB { get; set; }

        [Ignore]
        private  Dictionary<string, string> ProjectKindDic = new Dictionary<string, string>()
        {
            {"0","移行项目"},
            {"1","版本升级"},
            {"2","式样变更"},
            {"3","式样书作成"},
            {"4","新规作成"}
        };

    }
}
